package com.by.basicgateway.exception;

import com.by.toolkit.enums.ErrorCodeEnum;
import org.springframework.security.core.AuthenticationException;

public class ByAuthenticationServiceException extends AuthenticationException {

    private ErrorCodeEnum errorCodeEnum;

    public ByAuthenticationServiceException(String msg, ErrorCodeEnum errorCodeEnum) {
        super(msg);
        this.errorCodeEnum = errorCodeEnum;
    }

    public ByAuthenticationServiceException(String msg, Throwable cause) {
        super(msg, cause);
    }

    public ErrorCodeEnum getErrorCodeEnum(){
        return this.errorCodeEnum;
    }
}
